<template >
  <div id="app">
    <HomeHeader :city="city" />
    <router-view :userInform="userInform" v-if="isRouterAlive" />
  </div>
</template>

<script>
import HomeHeader from "./components/HomeHeader";
export default {
  components: {HomeHeader},
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      userInform: null,
      city: null,
      isRouterAlive: true
    }
  },
  mounted() {
    this.userInform = JSON.parse(localStorage.getItem('user'))
    this.city = window.returnCitySN.cname
  },
  methods: {
    reload() {
      this.isRouterAlive = false
      this.$nextTick(function () {
        this.isRouterAlive = true
      })
    }
  }
}
</script>

<style>
</style>
